import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home.vue'
import HomeEat from '@/views/Home/HomeEat.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    }, {
        path: '/homeEat',
        name: 'HomeEat',
        component: HomeEat
    }, {
        path: '/login',
        name: 'Login',
        component: () => import(/* webpackChunkName: "Login"*/ '../views/User/Login')
    }, {
        path: '/register',
        name: "Register",
        component: () => import(/* webpackChunkName: "Register"*/ '../views/User/Register')
    }, {
        path: '/myOrder',
        component: () => import(/* webpaceChunkName: "MyOrder"*/ '../components/ComInfor/MyOrder')
    }, {
        path: '/noTrip',
        component: () => import(/* webpaceChunkName: "NoTrip"*/ '../components/ComInfor/NoTrip')
    }, {
        path: '/toBeEvaluated',
        component: () => import(/* webpaceChunkName: "ToBeEvaluated"*/ '../components/ComInfor/ToBeEvaluated')
    }, {
        path: '/toBePaid',
        component: () => import(/* webpaceChunkName: "ToBePaid"*/ '../components/ComInfor/ToBePaid')
    }, {
        path: '/wallet',
        component: () => import(/* webpaceChunkName: "Wallet"*/ '../components/ComInfor/Wallet')
    }, {
        path: '/coupon',
        component: () => import(/* webpaceChunkName: "Coupon"*/ '../components/ComInfor/Coupon')
    }, {
        path: '/integral',
        component: () => import(/* webpaceChunkName: "Integral"*/ '../components/ComInfor/Integral')
    }, {
        path: '/takeTheFlowers',
        component: () => import(/* webpaceChunkName: "TakeTheFlowers"*/ '../components/ComInfor/TakeTheFlowers')
    }, {
        path: '/comInfor',
        component: () => import(/* webpaceChunkName: "ComInfor"*/ '../components/ComInfor/ComInfor')
    }, {
        path: '/myCollection',
        component: () => import(/* webpaceChunkName: "MyCollection"*/ '../components/ComInfor/MyCollection')
    }, {
        path: '/browsingHistory',
        component: () => import(/* webpaceChunkName: "BrowsingHistory"*/ '../components/ComInfor/BrowsingHistory')
    }, {
        path: '/cooperate',
        component: () => import(/* webpaceChunkName: "Cooperate"*/ '../components/ComInfor/Cooperate')
    }, {
        path: '/travelTools',
        component: () => import(/* webpaceChunkName: "TravelTools"*/ '../components/ComInfor/TravelTools')
    }, {
        path: '/homeCity',
        name: 'HomeCity',
        component: () => import(/* webpackChunkName: "homeCity"*/ '../views/Home/HomeCity')
    }, {
        path: '/homeStay',
        name: 'HomeStay',
        component: () => import(/* webpackChunkName: "homeStay"*/ '../views/Home/HomeStay')
    }, {
        path: '/homeTraffic',
        name: 'HomeTraffic',
        component: () => import(/* webpackChunkName: "homeTraffic"*/ '../views/Home/HomeTraffic')
    }, {
        path: '/person',
        name: 'Person',
        component: () => import(/* webpackChunKName: "Person"*/ '../views/User/Person')
    }, {
        path: '/scedetail',
        name: 'SceSportDetail',
        component: () => import(/* webpaceChunkName: "SceSportDetail"*/ '../views/Detail/SceSportDetail'),
    }, {
        path: '/map',
        component: () => import(/* webpaceChunkName: "Map" */ '../views/Map/Map'),
        children: [
            {
                path: 'mapUp',
                component: () => import(/* webpaceChunkName: "mapUp" */ '../components/MapDetail/MapUp')
            }
        ]
    }, {
        path: '/recomRightUp',
        name: 'RecomRightUp',
        component: () => import(/* webpaceChunkName: "recomRightUp" */ '../components/RecomRight/RecomRightUp')
    }, {
        path: '/recomRightDown',
        name: 'RecomRightDown',
        component: () => import(/* webpaceChunkName: "recomRightUp" */ '../components/RecomRight/RecomRightDown')
    }, {
        path: '/searchPage',
        name: 'SearchPage',
        component: () => import(/* webpaceChunkName: "searchPage" */ '../components/SearchPage/SearchPage')
    }
    // {
    //   path: '/about',
    //   name: 'About',
    //   // route level code-splitting
    //   // this generates a separate chunk (about.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    // }
]

const router = new VueRouter({
    // mode: 'history',
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})

export default router
